<?php
// TbBox
$this->beginWidget('bootstrap.widgets.TbBox', array(
	'title' => array(
		$this->projectName => array('project/schema'),
		'数据列表' => array('data/list'),
		(isset($_GET['id']) ? '更新数据' : '添加数据'),
	),
	'headerIcon' => isset($_GET['id']) ? 'icon-edit' : 'icon-plus',
));
// form
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'focus' => array($model, $model->getXS()->getFieldId()->name),
)); /* @var $model TbActiveForm */
?>
<fieldset>
	<?php foreach ($model->attributeNames() as $name): ?>
	<?php echo $form->labelEx($model, $name); ?>
	<?php echo $model->inputEx($form, $name, array('class' => 'span6')); ?>
	<?php echo $form->error($model, $name); ?>
	<?php endforeach; ?>
</fieldset>
<div class="row-bottom">
	<?php
	$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => '保存')); 
	echo ' ';
	$this->widget('bootstrap.widgets.TbButton', array('label' => '返回', 'url' => array('data/list')));
	?>
</div>
<?php $this->endWidget(); ?>
<?php $this->endWidget(); ?>
